
from celery import Celery


import os
if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE']='mall.settings'

# 实例化celery对象
app=Celery('celery_tasks')

# 加载配置文件
app.config_from_object('celery_tasks.config')

# 自动加载任务
# app.autodiscover_tasks(['celery_tasks.sms'])
app.autodiscover_tasks(['celery_tasks.sms','celery_tasks.send_email','celery_tasks.html'])

